Ext.define('HIT.view.MergeDetailsWin', {
    extend: 'Ext.window.Window',
    alias: 'widget.mergedetailswin',

    height: 358,
    width: 800,
    title: Share.T('设置合并明细的条件'),

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            items: [
                {
                    xtype: 'form',
                    height: 297,
                    layout: {
                        type: 'absolute'
                    },
                    items: [
                        {
                            xtype: 'radiogroup',
                            x: 20,
                            y: 10,
                            height: 20,
                            padding: 50,
                            width: 430,
                            layout: {
                                type: 'absolute'
                            },
                            fieldLabel: Share.T('数量'),
                            id:'merge-detail-quantity',
                            items: [
                                {
                                    xtype: 'radiofield',
                                    x: 20,
                                    y: -1,
                                    name:'merge-detail-quantity',
                                    inputValue :'1',
                                    boxLabel: Share.T('相同'),
                                    checked:true
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 163,
                                    y: 0,
                                    fieldLabel: '',
                                    name:'merge-detail-quantity',
                                    inputValue :'2',
                                    boxLabel: Share.T('相加')
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 330,
                                    y: -1,
                                    fieldLabel: '',
                                    name:'merge-detail-quantity',
                                    inputValue :'3',
                                    boxLabel: Share.T('反算')
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 480,
                                    y: 0,
                                    name:'merge-detail-quantity',
                                    inputValue :'4',
                                    boxLabel: Share.T('置为')
                                }
                            ]
                        },
                        {//数量置为输入框
                            xtype: 'textfield',
                            x: 650,
                            y: 10,
                            fieldLabel: '',
                            width:120,
                            id:'merge-detail-quantity-input',
                            value:1
                        },
                        {
                            xtype: 'radiogroup',
                            x: 20,
                            y: 50,
                            height: 20,
                            width: 430,
                            layout: {
                                type: 'absolute'
                            },
                            fieldLabel: Share.T('单价'),
                            id:'merge-detail-price',
                            items: [
                                {
                                    xtype: 'radiofield',
                                    x: 20,
                                    y: -1,
                                    name:'merge-detail-price',
                                    inputValue :'1',
                                    boxLabel: Share.T('相同'),
                                    checked:true
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 330,
                                    y: -1,
                                    name:'merge-detail-price',
                                    inputValue :'2',
                                    boxLabel: Share.T('反算')
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 480,
                                    y: -2,
                                    fieldLabel: '',
                                    name:'merge-detail-price',
                                    inputValue :'3',
                                    boxLabel: Share.T('置为')
                                }
                            ]
                        },
                        {//单价置为输入框
                            xtype: 'textfield',
                            x: 650,
                            y: 50,
                            width:120,
                            id:'merge-detail-price-input',
                            fieldLabel: ''
                        },
                        {
                            xtype: 'radiogroup',
                            x: 20,
                            y: 90,
                            height: 20,
                            width: 430,
                            layout: {
                                type: 'absolute'
                            },
                            id:'merge-detail-name',
                            fieldLabel: Share.T('名称'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    x: 20,
                                    y: -1,
                                    name:'merge-detail-name',
                                    inputValue :'1',
                                    boxLabel: Share.T('相同'),
                                    checked:true
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 163,
                                    y: -2,
                                    fieldLabel: '',
                                    name:'merge-detail-name',
                                    inputValue :'2',
                                    boxLabel: Share.T('最大值')
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 330,
                                    y: -2,
                                    name:'merge-detail-name',
                                    inputValue :'3',
                                    boxLabel: Share.T('最小值')
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 480,
                                    y: -1,
                                    fieldLabel: '',
                                    name:'merge-detail-name',
                                    inputValue :'4',
                                    boxLabel: Share.T('置为')
                                }
                            ]
                        },
                        {//名称置为输入框
                            xtype: 'textfield',
                            x: 650,
                            y: 90,
                            width:120,
                            id:'merge-detail-name-input',
                            fieldLabel: ''
                        },
                        {
                            xtype: 'radiogroup',
                            x: 20,
                            y: 130,
                            height: 20,
                            width: 430,
                            layout: {
                                type: 'absolute'
                            },
                            id:'merge-detail-spec',
                            fieldLabel: Share.T('规格'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    x: 20,
                                    y: -2,
                                    name:'merge-detail-spec',
                                    inputValue :'1',
                                    boxLabel: Share.T('相同'),
                                    checked:true
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 163,
                                    y: -3,
                                    name:'merge-detail-spec',
                                    inputValue :'2',
                                    boxLabel: Share.T('最大值')
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 330,
                                    y: -2,
                                    fieldLabel: '',
                                    name:'merge-detail-spec',
                                    inputValue :'3',
                                    boxLabel: Share.T('最小值')
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 480,
                                    y: -2,
                                    fieldLabel: '',
                                    name:'merge-detail-spec',
                                    inputValue :'4',
                                    boxLabel: Share.T('置为')
                                }
                            ]
                        },
                        {//规格置为输入框
                            xtype: 'textfield',
                            x: 650,
                            y: 130,
                            width:120,
                            id:'merge-detail-spec-input',
                            fieldLabel: ''
                        },
                        {
                            xtype: 'radiogroup',
                            x: 20,
                            y: 170,
                            height: 20,
                            width: 430,
                            layout: {
                                type: 'absolute'
                            },
                            id:'merge-detail-unit',
                            fieldLabel: Share.T('单位'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    x: 20,
                                    y: -1,
                                    name:'merge-detail-unit',
                                    inputValue :'1',
                                    boxLabel: Share.T('相同'),
                                    checked:true
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 163,
                                    y: -1,
                                    name:'merge-detail-unit',
                                    inputValue :'2',
                                    boxLabel: Share.T('最大值')
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 330,
                                    y: -1,
                                    fieldLabel: '',
                                    name:'merge-detail-unit',
                                    inputValue :'3',
                                    boxLabel: Share.T('最小值')
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 480,
                                    y: 0,
                                    fieldLabel: '',
                                    name:'merge-detail-unit',
                                    inputValue :'4',
                                    boxLabel: Share.T('置为')
                                }
                            ]
                        },
                        {//单位置为输入框
                            xtype: 'textfield',
                            x: 650,
                            y: 170,
                            width:120,
                            id:'merge-detail-unit-input',
                            fieldLabel: ''
                        },
                        {
                            xtype: 'radiogroup',
                            x: 20,
                            y: 210,
                            height: 20,
                            width: 430,
                            layout: {
                                type: 'absolute'
                            },
                            id:'merge-detail-item',
                            fieldLabel: Share.T('税目'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    x: 20,
                                    y: -1,
                                    name:'merge-detail-item',
                                    inputValue :'1',
                                    boxLabel: Share.T('相同'),
                                    checked:true
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 163,
                                    y: -1,
                                    name:'merge-detail-item',
                                    inputValue :'2',
                                    boxLabel: Share.T('最大值')
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 330,
                                    y: 0,
                                    fieldLabel: '',
                                    name:'merge-detail-item',
                                    inputValue :'3',
                                    boxLabel: Share.T('最小值')
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 480,
                                    y: -1,
                                    height: 17,
                                    fieldLabel: '',
                                    name:'merge-detail-item',
                                    inputValue :'4',
                                    boxLabel: Share.T('置为')
                                }
                            ]
                        },
                        {//税目置为输入框
                            xtype: 'textfield',
                            x: 650,
                            y: 210,
                            width:120,
                            id:'merge-detail-item-input',
                            fieldLabel: ''
                        },
                        {
                            xtype: 'radiogroup',
                            x: 20,
                            y: 250,
                            height: 30,
                            width: 400,
                            layout: {
                                type: 'absolute'
                            },
                            id:'merge-detail-disrate',
                            fieldLabel: Share.T('折扣率'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    x: 20,
                                    y: -2,
                                    name:'merge-detail-disrate',
                                    inputValue :'1',
                                    boxLabel: Share.T('相同'),
                                    checked:true
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 330,
                                    y: -3,
                                    name:'merge-detail-disrate',
                                    inputValue :'2',
                                    boxLabel: Share.T('重算')
                                }
                            ]
                        }
                    ]
                }
            ],
            buttons:[{
             	 text:Share.T('确定'),
             	 id:'merge-detail-save'
               },{
             	 text:Share.T('取消'),
             	 handler : function(){
                     this.up('window').close();
                 }
               }]
        });

        me.callParent(arguments);
    }

});